<div id="editor-styles" style="border: 1px solid #ddd;">
	<div style="line-height:30px;">
          	<div style="height:40px;padding:5px;color: #FFF; background-color: rgb(95, 179, 213);">
          		135编辑器
          		<!-- <input type="text" placeholder="输入关键字搜索样式" style="height:30px;width:240px;color: #FFF;background-color: transparent; border: 0 none; padding:0 10px;" id="txtStyleSearch"> 
          		<span style="cursor:pointer;float:right;margin-right:20px;" onclick="reloadStyleOperate();" data-toggle="tooltip" data-container="body" data-placement="bottom" title="刷新样式"><i class="fa fa-refresh"></i></span>
          		 -->
          	</div>
          	<div id="styleSearchResult" style="position:absolute;display:none;top:40px;left:80px;padding:10px;width:384px;z-index: 100;border: 5px solid rgba(80,80,80,0.2);background:#FFF;">
          		<p>搜索结果 <span class="btn" style="float:right;font-size: 24px;    color: #000000;font-weight: bold;text-shadow: 0 1px 0 #ffffff;" onclick="$('#styleSearchResult').hide();"> × </span> </p>
          		<div id="styleSearchResultList" style="height:500px;width:100%;overflow-y:auto;">
          			<img src="/img/ajax/circle_ball.gif">
          		</div>
          	</div>
	 </div>
	 <div style="background-color:rgba(234,234,234,0.9);height:40px;line-height: 40px;text-align:center;">
          	<ul id="style-categories" >
				<li>
					<span class="filter" data-filter=".tagtpl-107">  文字 </span>
				</li>
				<li>
					<span class="filter" data-filter=".tagtpl-222"> 图片 </span>
					
				</li>
				<li>
					<span class="filter" data-filter=".tagtpl-151"> 图文 </span>
				</li>
				<li>
					<span class="filter" data-filter=".tagtpl-111"> 视听 </span>
				</li>	
			</ul>
	  </div>
	  <div id="style-overflow-list" style="overflow-y:auto;overflow-x:hidden;height:500px;background-color: #FFF;">
	          	{{if $current_user_id}}
		  			<?php  $fav_ids = array(); $favor_pages = ''; ?>
			  		<div class="ui-portlet clearfix ">
			  			<ul  class="editor-template-list ui-portlet-list" style="padding: 5px;background-color: #FFF;">
				  			<portlet  cache="no" ulclass="editor-template-list" portlet="body" list_tpl="inner"
				  			 limit="500"
							 model="EditorStyle" order="Favorite.click_nums desc" 
							 info="recursive=1&joins[0][table]=favorites&joins[0][alias]=Favorite&joins[0][type]=inner&joins[0][conditions][Favorite.model]=EditorStyle&joins[0][conditions][]=Favorite.data_id=EditorStyle.id&conditions[EditorStyle.cate_id]=1&conditions[]=Favorite.creator_id=$current_user_id&fields[]=support_brush&fields[]=cate_id&fields[]=summary&fields[]=origin&fields[]=Favorite.id&fields[]=Favorite.click_nums&fields[]=Favorite.updated&fields[]=content&fields[]=name&fields[]=id&fields[]=coverimg">
									<?php  $fav_ids[] = $item['id']; ?>
									<li  style="position:relative;" data-click="{{$item_all['Favorite']['click_nums']}}" data-time="{{strtotime($item_all['Favorite']['updated'])}}"
{{if $item['summary']}} data-content="{{str_replace('"','',$item['summary'])}}" data-title="{{$item['name']}}" data-trigger="hover" data-placement="right" data-container="body" data-toggle="popover"{{else}}  title="{{$item['name']}}" {{/if}}
class="fav-style col-xs-12 {{loop $item_all['Tag'] $tag}}  tagtpl-{{$tag['id']}} {{/loop}}" data-id="{{$item['id']}}">
										<section class="135editor"  data-id="{{$item['id']}}">{{$item['content']}}<section style="display: block; width: 0; height: 0; clear: both;"></section></section>
										<div style="position:absolute;bottom:0px;right:0px;width:150px;text-align:right;">
											{{if !empty($_SESSION['Auth']['Staff']) }}
										    		<a class="btn btn-xs" href="{{Router::url('/admin/editor_styles/edit/'.$item['id'])}}" target="_blank">
										    		<i class="fa fa-edit"></i>
										    		</a>
										    {{/if}}
											<a class="btn btn-xs" style="color:rgb(255, 129, 36);font-size:20px;" href="javascript:;" data-url="{{$this->Html->url('/favorites/refresh/'.$item_all['Favorite']['id'])}}" onclick="return refreshfavorite(this);">
												<i class="fa fa-arrow-up" data-toggle="tooltip" data-container="body" data-placement="top" title="{{__('Move Top')}}" ></i>
											</a> 
											<a class="btn btn-xs" style="color:rgb(255, 129, 36);font-size:20px;" href="javascript:;"  data-url="{{$this->Html->url('/favorites/cancel/'.$item_all['Favorite']['id'])}}" onclick="return unfavorite(this);">
												<i class="fa fa-trash" data-toggle="tooltip" data-container="body" data-placement="top" title="{{__('Cancel Favorite')}}"></i>
											</a>
										</div>
									</li>
							</portlet>
							<portlet  cache="900" ulclass="editor-template-list" portlet="body" list_tpl="inner" limit="100" model="EditorStyle" order="recommend desc,click_nums desc" info="recursive=1&fields[]=summary&fields[]=origin&fields[]=content&fields[]=name&fields[]=support_brush&fields[]=id&conditions[cate_id]=1&conditions[recommend]=1&conditions[status]=1">
									<?php  if(in_array($item['id'],$fav_ids)) continue; ?>
									<li data-click="0" data-time="0"
									{{if $item['summary']}} data-content="{{str_replace('"','',$item['summary'])}}" data-title="{{$item['name']}}" data-trigger="hover" data-placement="right" data-container="body" data-toggle="popover"{{else}}  title="{{$item['name']}}" {{/if}}
									class="recomment-style col-xs-12 tag-recommend {{loop $item_all['Tag'] $tag}}  tagtpl-{{$tag['id']}} {{/loop}}" data-id="{{$item['id']}}">
										<section class="135editor"  data-id="{{$item['id']}}">{{$item['content']}}<section style="display: block; width: 0; height: 0; clear: both;"></section></section>
										<div style="position:absolute;bottom:0px;right:0px;width:150px;text-align:right;">
											{{if !empty($_SESSION['Auth']['Staff']) }}
										    		<a class="btn btn-xs" href="{{Router::url('/admin/editor_styles/edit/'.$item['id'])}}" target="_blank">
										    			<i class="fa fa-edit"></i>
										    		</a>
										    {{/if}}									
											<a class="btn btn-xs" style="color:rgb(255, 129, 36);font-size:20px;" href="javascript:;" data-url="{{$this->Html->url('/favorites/add/'.$item_all['Favorite']['id'])}}" onclick="return addtofavor('EditorStyle','{{$item['id']}}',this);">
												<i class="fa fa-heart-o"  data-toggle="tooltip" data-container="body" data-placement="top" title="{{__('Favorite')}}" ></i>
											</a>
										</div>
									</li>
								</portlet>
						</ul>
					</div>
				{{else}}
					<ul  class="editor-template-list ui-portlet-list"  style="padding-top: 5px;background-color: #FFF;">
											  			
					  		<portlet  cache="900" ulclass="editor-template-list" portlet="body" list_tpl="inner" limit="100" model="EditorStyle" order="recommend desc,click_nums desc" info="recursive=1&fields[]=summary&fields[]=origin&fields[]=content&fields[]=name&fields[]=support_brush&fields[]=id&conditions[cate_id]=1&conditions[status]=1&conditions[recommend]=1">
								<li {{if $item['summary']}} data-content="{{str_replace('"','',$item['summary'])}}" data-title="{{$item['name']}}" data-trigger="hover" data-placement="right" data-container="body" data-toggle="popover"{{else}}  title="{{$item['name']}}" {{/if}}
								class="recomment-style {{if $key%2==1}}itembg2{{/if}} col-xs-12 tag-recommend {{loop $item_all['Tag'] $tag}} tagtpl-{{$tag['id']}} {{/loop}}" data-id="{{$item['id']}}">
									<section class="135editor"  data-id="{{$item['id']}}">{{$item['content']}}<section style="display: block; width: 0; height: 0; clear: both;"></section></section>
								</li>
							</portlet>
					</ul>					
				{{/if}}
	</div>
</div>

<section id="color-plan" style="width:110px;position:fixed;top:105px;right:-5px;height:320px;text-align: center;display:none;z-index: 1000;">
	<div id="color-choosen" style="position:absolute;right:0px;padding: 10px 0px !important;width:105px;padding:5px 0;background:rgba(58,51,50,0.8);">		
			  	<div style="margin:5px 5px;color:#FFF;line-height:32px;text-align: center;position:relative;" >
		        	<input id="custom-color-text" class="colorPicker form-control" style="font-size:12px;width:80px;color:#FFF;padding:4px;height:24px;line-height:16px" id="custom-color" value="#EF7060" />
		        </div>
		        
		        <div style="margin:0 0;color:#dad9d8;line-height:18px;text-align: center;"><label style="cursor:pointer;margin-bottom:0px;"><input style="margin-top:8px;" type="checkbox" id="replace-color-all" value="1"> 全文换色</label></div>

			 	<hr style="margin:2px 20px;border-color:#ddd;"/>
			    <ul class="clearfix" style="list-style:none;padding:0 5px;margin:0 0;">
		            <li class="color-switch" style="background-color: #ac1d10"></li>
		            <li class="color-switch" style="background-color: #d82821;"></li>
		            <li class="color-switch default-color" style="background-color: #ef7060;"></li>
		            <li class="color-switch" style="background-color: #fde2d8;"></li>
		            
		            <li class="color-switch" style="background-color: #d32a63;"></li>
		            <li class="color-switch" style="background-color: #eb6794;"></li>
		            <li class="color-switch" style="background-color: #f5bdd1;"></li>            
		            <li class="color-switch" style="background-color: #ffebf0;"></li>
		            
		            <li class="color-switch" style="clear:left;background-color: #e2561b;"></li>
		            <li class="color-switch" style="background-color: #ff8124;"></li>
		            <li class="color-switch" style="background-color: #fcb42b;"></li>
		            <li class="color-switch" style="background-color: #feecaf;"></li>
		            
		            <li class="color-switch" style="clear:left;background-color: #0c8918;"></li>
		            <li class="color-switch" style="background-color: #80b135;"></li>
		            <li class="color-switch" style="background-color:#c2c92a;"></li>
		            <li class="color-switch" style="background-color:#e5f3d0;"></li>
		            
		            <!-- <li class="color-switch" style="clear:left;background-color: #1f877a;"></li>
		            <li class="color-switch" style="background-color: #27abc1;"></li>
		            <li class="color-switch" style="background-color: #5acfe1;"></li>
		            <li class="color-switch" style="background-color: #b6f2ea;"></li> -->
		            
		            <li class="color-switch" style="clear:left;background-color:#374aae;"></li>
		            <li class="color-switch" style="background-color:#1e9be8;"></li>
		            <li class="color-switch" style="background-color:#59c3f9;"></li>
		            <li class="color-switch" style="background-color:#b6e4fd;"></li>
		
		            <li class="color-switch" style="clear:left;background-color:#5b39b4;"></li>
		            <li class="color-switch" style="background-color: #4c6ff3;"></li>
		            <li class="color-switch" style="background-color:#91a8fc;"></li>
		            <li class="color-switch" style="background-color:#d0dafe;"></li>
		            
		            <!-- 紫色 -->
		            <li class="color-switch" style="clear:left;background-color:#8d4bbb;"></li>
		            <li class="color-switch" style="background-color: rgb(166, 91, 203);"></li>
		            <li class="color-switch" style="background-color:#cca4e3;"></li>
		            <li class="color-switch" style="background-color: rgb(190, 119, 99);"></li>
		            
		            <li class="color-switch" data-color="#efefef" style="clear:left;background-color:#3c2822;"></li>
		            <li class="color-switch" style="background-color:#6b4d40;"></li>
		            <li class="color-switch" style="background-color:#9f887f;"></li>
		            <li class="color-switch" style="background-color:#d7ccc8;"></li>
		            
		        	<li class="color-switch" style="background-color: #212122;"></li>
		        	<li class="color-switch" style="background-color: #757576;"></li>
		        	<li class="color-switch" style="background-color: #c6c6c7"></li>
		        	<li class="color-switch" style="background-color: #f5f5f4"></li>
		        	
		        </ul>
	</div>        
</section>
